package com.qyy.remotemonitor.http;

import android.app.BuildConfig;

import com.blankj.utilcode.util.PhoneUtils;

import java.io.IOException;

import okhttp3.Interceptor;
import okhttp3.Request;
import okhttp3.Response;

/**
 * Created by wujiajun on 17/4/11.
 */

public class CookieInterceptor implements Interceptor {

    @Override
    public Response intercept(Chain chain) throws IOException {
        Request original = chain.request();
        Request request = original.newBuilder()
            //    .header("deviceType", "android")
              //  .header("IMEI", PhoneUtils.getIMEI())
            //    .header("version", ""+ BuildConfig.VERSION_CODE)
                .method(original.method(), original.body())
                .build();
        Response response = chain.proceed(request);
        Response newResponse = response.networkResponse();
        if(  newResponse.body() == null)
        {
         //   newResponse.
            int id = 0;
        }

        return response;
    }
}
